package service;

import domain.Role;

import java.util.List;

/**
 * @author Freedy
 * @date 2020/12/25 23:19
 */
public interface IRoleService {

    /**
     * 查询所有角色
     * @return
     * @throws Exception
     */
    List<Role> findAll() throws Exception;

    /**
     * 保存角色
     * @param role
     * @throws Exception
     */
    void save(Role role) throws Exception;

    /**
     * 根据id查询角色
     * @param id
     * @return
     * @throws Exception
     */
    Role findById(String id) throws Exception;

    /**
     * 添加权限
     * @param ids
     * @throws Exception
     */
    void addPermissionByRoleId(Integer[] ids,int id) throws Exception;

    /**
     * 删除role
     * @param id
     * @throws Exception
     */
    void deleteRole(String id) throws Exception;
}
